<?php

namespace App\Http\Controllers\Payment;

use App\Http\Controllers\Controller;
use App\Models\Common\ApiResponse;
use App\Models\Common\Constant;
use Illuminate\Http\Request;

class PayTypeController extends Controller
{

    public $needLogging = false;

    public function index()
    {
        $dataPacket = [];

        return ApiResponse::return('', $dataPacket);
    }

    public function all()
    {
        $dataPacket = [];
        $dis = []; // Constant::PAY_TYPE_MERCHANT_BALANCE, Constant::PAY_TYPE_STORE_CAR_BALANCE
        foreach (Constant::PAY_TYPES as $key => $item) {
            if (!in_array($item, $dis)) {
                $dataPacket[] = [
                    'name' => $key,
                    'value' => $item
                ];
            }
        }

        return ApiResponse::return('', $dataPacket);
    }

    public function store(Request $request)
    {
        $user = admin();

        return ApiResponse::return('', null, ApiResponse::RESP_CODE_FAILURE);
    }
}
